package com.maomao.maomaochong_i.adapterPackage;

import com.maomao.maomaochong_i.chuangZhi.GuoWu;
import com.maomao.maomaochong_i.chuangZhi.GuoWuShuJu;
import com.maomao.maomaochong_i.chuangZhi.Xiugai;
import com.maomao.maomaochong_i.chuangZhi.YingYong;
import com.maomao.maomaochong_i.guowuche.ShiJian;

/**
 * Created by Mrma on 17.5.19.
 */

public class GuoWuChe implements YingYong,Xiugai {
    public GuoWu guoWu;
    public GuoWuShuJu guoWuShuJu;

    private static GuoWuChe gwc;

    public static GuoWuChe getOne(GuoWu guoWu){
        if(gwc == null){
            gwc = new GuoWuChe(guoWu);
        }
        return gwc;
    }

    private GuoWuChe(GuoWu guoWu){
        this.guoWu = guoWu;
        guoWu.tianjia(this);
    }
    @Override
    public void xiugai(GuoWuShuJu guoWuShuJu) {
        this.guoWuShuJu = guoWuShuJu;
        play();
    }

    @Override
    public void play() {
        ShiJian.gengxing = true;
    }
}

